home *** CD-ROM | disk | FTP | other *** search
/ Informática Multimedia 1995 April / Informatica Multimedia CD - Epimundo.iso / DOS / FILE_CHG / FM_DS.ZIP / FM.DOC < prev   
Encoding:
Text File  |  1986-08-18  |  11.2 KB  |  225 lines

  1. ¢4 L
  2.                                    FM.COM
  3.  
  4.                   Doug Schaffer                Barry Simon
  5.  
  6.  
  7.  
  8.          FM (for File Modify) is a little utility which allows you to
  9.          easily edit files at the individual byte level.  It is especially
  10.          useful in situations where one might use DEBUG to modify a byte in
  11.          order to patch a program, to change the wording of messages in
  12.          your programs which bother you (its search capabilities are useful
  13.          for this) or to change color attributes in a program.
  14.  
  15.          The program is invoked by typing     fm FILESPEC
  16.  
  17.          If FILESPEC is of the form NAME.EXT, the program with that name in
  18.          the current drive and directory will be loaded.  But fm supports
  19.          other drives and full path names so if your default drive is A:
  20.          and FM.COM is on the current drive or in the DOS search path, the
  21.          command "fm B:\some directory\some filename" will work perfectly.
  22.  
  23.  
  24.          KEYSTOKE COMMANDS
  25.  
  26.          A description of the most important keystrokes is displayed on the
  27.          fm screen and the others are described in the help screen.  The
  28.          commands involve the function keys, cursor keypad, <TAB> and
  29.          <ESCAPE>.
  30.  
  31.                The function keys have the following meanings
  32.          F1:Help      F2:Search       F3:NOT USED       F4:NOT USED
  33.          F5:Hex/Decimal toggle   F6:ASCII display toggle    F7:NOT USED
  34.          F8:NOT USED      F9:Sector Save       F10:Sector Jump
  35.  
  36.          <ESCAPE> exits the program.
  37.          <TAB> toggles the active cursor between the HEX and ASCII areas.
  38.          The Cursor Arrow keys do the obvious things.
  39.          <PGDN> reads the next sector.
  40.          <CTRL-PGDN> the sector 5 sectors down.
  41.          <PGUP> & <CTRL-PGUP> undo the actions of <PGDN> & <CTRL-PGDN>.
  42.          <Home> moves the cursor to the start of the active line.
  43.          <End> moves the cursor to the end of the active line.
  44.  
  45.  
  46.          THE FM DISPLAY
  47.  
  48.          Fm displays the file in "sectors" of 256 bytes each in 16 lines
  49.          with 16 bytes per line.  The line below the main display shows the
  50.          file name, its date and time of creation or last update and the
  51.          word HEX or ASCII indicating which part of the main display is
  52.          active.  The <TAB> key toggles which is the active display and in
  53.          addition to status line the active display is indicated by the
  54.          block cursor.  Modifications are made on the active display as
  55.          will be explained.
  56.  
  57.          The first column of numbers in the active display labels the lines
  58.          by indicating the number of the first byte on the line.  In the
  59.          default mode the numbers are in hexidecimal and appear in <..>.
  60.  
  61.          The <F5> key toggles to a decimal numbering of the lines.  The
  62.          next 16 columns of data show the HEX value of each byte, the 256
  63.          possibilities for a byte corresponding to two HEX digits.  The
  64.          next "column" gives the current sector number within the file and
  65.          the number of sectors.  In default mode, these numbers are given
  66.          in HEX but <F5> toggles not only the line numbers but also whether
  67.          these numbers are given in HEX or decimal.  This same column also
  68.          reports the current value of the <F5> HEX/decimal toggle.
  69.  
  70.          The right hand columns show the individual lines in ASCII form.
  71.          In the default mode, only "text characters" are shown with all
  72.          non-text characters (ASCII numbers 0-31;129-256) are indicated by
  73.          periods. <F6> toggles to and from a mode where these characters
  74.          are shown.  In the non-text mode, you can do a screen dump with
  75.          <Shift PrtSc>
  76.  
  77.          A help screen is displayed if one hits <F1>.  You can exit the
  78.          help screen by hitting <F1> or <ESCAPE>.
  79.  
  80.  
  81.  
  82.  
  83.  
  84.                                     FM  page 2
  85.  
  86.  
  87.          MANEUVERING
  88.  
  89.          The <PGDN> and <PGUP> keys read the next and previous sectors.
  90.          Depressing the <CTRL> key while hitting these keys makes a change
  91.          of 5 sectors.  If the <F10> key is depressed, you are prompted for
  92.          a new sector number.  Responding <ENTER> will move you to the
  93.          first sector (thus since unsuccessful searches will leave you in
  94.          the last sector, you'll probably want to follow an unsuccessful
  95.          search by the <F10>,<ENTER> combination).  Otherwise, a number
  96.          should be entered and the program will jump to the appropriate
  97.          sector.  If line numbers, etc are displayed in HEX (resp decimal),
  98.          the sector number should be entered in HEX (resp. decimal).
  99.  
  100.  
  101.          MODIFYING
  102.  
  103.          The whole point of FM is to change the file.  In the default mode,
  104.          the block cursor is in the ASCII part of the screen.  The cursor
  105.          can be moved with the arrow, home and end keys.  If a text
  106.          character is struck, the character at the cursor is replaced by
  107.          the character struck.  The <TAB> key toggles to the HEX display.
  108.          Modification of the two HEX digit byte under the cursor is made by
  109.          striking the appropriate keys.  Even if only one of the two digits
  110.          needs to be changed, you must enter both of them.  If you have
  111.          entered the first digit, it will change on the display and flash
  112.          until the second digit is entered.  If any key other than 0-9,a-e
  113.          is struck the byte returns to its initial value.
  114.  
  115.          Any changes made are indicated on both the HEX and ASCII display
  116.          but they are only made in memory and NOT on the original file.  To
  117.          make the changes in the original file, you must hit the <F9> key.
  118.          <F9> only saves the changes made in the currently active sector
  119.          and not any changes made previously in other sectors.  If you try
  120.          to exit the program or change the sector shown and you have made
  121.          any unsaved changes, you are prompted to hit <F9> to save the
  122.          changes if you wish.
  123.  
  124.  
  125.          SEARCHING
  126.  
  127.          You can do a rudimentary search through the entire file FOLLOWING
  128.          the cursor (not just the current sector).  Hitting the <F2> key
  129.          prompts for a search string.  ASCII search strings will be
  130.          searched regardless of whether the current active mode is ASCII or
  131.          HEX.  To do a HEX search, proceed the byte with a "_".  Do not
  132.          place quotes around _ or around search text.  You can search for
  133.          multiple HEX bytes (so _41_61 will search for Aa) and ASCII and
  134.          HEX can be mixed in the search string (so A_42C_44 will search for
  135.          ABCD).
  136.  
  137.  
  138.          MODIFYING FM
  139.  
  140.          One of the uses of fm is to modify itself if you wish to change
  141.          some of the defaults in the program.  The twelve defaults which
  142.          can be changed occur in sectors 1 (the first eight below) and 3 in
  143.          the form <relevant byte>-<FUNCTION>.  Thus, to change the color
  144.          attribute for the ASCII text display, find the string ASCII.  The
  145.          byte immediately preceding it is 2D(hex) for - and the byte before
  146.          that (which is 07 for grey on black) can be modified to change the
  147.          display color.  For example, changing it to 1E will make that
  148.          display as yellow on blue (on a color monitor).  The color code is
  149.          the standard one set by IBM (but different from the BASIC and
  150.          ANSI.SYS color codes), namely:
  151.  
  152.                      0  black                4  red
  153.                      1  blue                 5  magenta
  154.                      2  green                6  brown (yellow)
  155.                      3  cyan                 7  grey (white)
  156.  
  157.          Adding 8(Hex) to these for the foreground color produces their
  158.          "intense" version; intense brown is yellow and intense grey is
  159.          white.  Adding 8 (Hex) to the background color causes the
  160.          foreground to flash.  The first HEX digit determines the
  161.          background and the second the foreground.  As indicated 1E (E=6+8
  162.          Hex) is yellow on blue while 9E would be flashing yellow on blue.
  163.  
  164.  
  165.  
  166.                                     FM  page 3
  167.  
  168.          Here are the other attributes which can be modified:
  169.  
  170.          LINE#  Color attributes for line number;
  171.                   default is 04=red on black
  172.          HEX    Color attributes for the HEX display;
  173.                   default is 06=brown on black
  174.          HEXED  Color attribute for the one changed HEX digit when editing
  175.                   in HEX mode and only one digit has been changed;
  176.                   default is F0=flashing black on white
  177.          ACTIVE CURSOR  Color attributes of the active cursor;
  178.                   default is 70=black on white.
  179.          PASSIVE CURSOR Color attributes of the position of the cursor on
  180.                  the inactive screen (shadow cursor);
  181.                  default is 01=blue on black
  182.          HELP SCREEN Color attributes of Help Screen;
  183.                  default is 74=red on white
  184.          HELP BORDER Color attributes of Help Border;
  185.                  default is 1C=intense red on blue
  186.          BOOT MODE The default is 00 which cause the ASCII screen to be the
  187.                  active one when the program is loaded.  Change it to 01 to
  188.                  make the HEX screen active upon program loading.
  189.          BOOT DSTYLE  The default is 00 which cause the line numbers, etc.
  190.                  to appear in HEX upon loading.  Change to 01 to make
  191.                  decimal used upon loading.
  192.          GRAPHICS  The default is 00 which causes only text characters to be
  193.                  displayed in the ASCII display when the program is loaded.
  194.                  Change to 01 to make all characters display upon loading.
  195.          HEXID   The ASCII character used in a search string to preface a
  196.                  HEX specification.  The default is _ which has an ASCII
  197.                  code of 5F.  To change _ to $ for example change 5F to 24.
  198.  
  199.          The three items preceding HEXID concern the initial settings of
  200.          the choices controlled by the <TAB>, <F5> and <F6> toggles.  Some
  201.          of the default attribute settings are chosen so the display is
  202.          useful on a monochrome monitor and you may wish to change them if
  203.          you run fm from a color monitor.
  204.  
  205.  
  206.          DISCLAIMER
  207.  
  208.          The FM program is written and copyright by Doug Schaffer.  These
  209.          documentation is written by Barry Simon.  While the program has
  210.          been used extensively and appears to be bug free, it is a powerful
  211.          program and the responsibility for its use and any damages it
  212.          might cause lies with the user.  Any comments can be sent to:
  213.  
  214.                 Doug Schaffer                Barry Simon
  215.                 Caltech 1-78                 Caltech 253-37
  216.                 Pasadena, CA 91125           Pasadena, CA 91125
  217.  
  218.          While the program was written at Caltech, that institution bears
  219.          no responsibility for the program.
  220.  
  221.          FM.COM may be freely distributed and used, but selling FM or
  222.          bundling FM with software that is sold is not allowed.  Only
  223.          unmodified copies of the original software may be distributed.
  224. ¢0 L
  225.